home *** CD-ROM | disk | FTP | other *** search
- * Easy V - Generated by EasyCODE(SPX) V6.0 at 14.03.1996 10:20:52
- * Easy V - with C:\EASY\ABAP4.CFG
- * Easy ( ABAPEXMP
- * Easy !
- REPORT ABAPEXMP.
- * Easy ( DATA
- * Easy !
- SEGMENTS: MA.
- TABLES: MACO,
- ZZV03.
- DATA: K01_NEWRECORD(5) VALUE 'KV31',
- K_STRU(4) TYPE C VALUE 'K203',
- SEARCH_FLAG(1) TYPE C.
- DATA:
- BEGIN OF E_RECORD,
- FILLER(4) TYPE C,
- SITE(2) TYPE C,
- REST(100) TYPE C.
- END OF E_RECORD,
-
- * Easy )
- * Easy ( PROCESSING
- * Easy !
- DO.
- CASE MODUS.
- WHEN 'ONLINE'.
- READ DATASET DSNR INTO E_RECORD.
- WHEN 'BATCH'.
- READ DATASET DSNAME INTO E_RECORD.
- WHEN OTHERS.
- EXIT.
- ENDCASE.
- MOVE E_RECORD-REST TO AVTS+4.
- IF NOT ( SY-SUBRC = 0 ).
- IF SY-INDEX EQ 1.
- WRITE: / 'NO DATA AVAILABLE'.
- ENDIF.
- EXIT.
- ENDIF.
- ON CHANGE OF E_RECORD-SITE.
- PERFORM U020-INIT-BTCI.
- ENDON.
- * Easy ( GET PART NUMBER
- * Easy !
- MOVE E_RECORD-MACID TO Z_MACID.
- * Easy ( DECISION E_RECORD-SITE
- * Easy !
- CASE E_RECORD-SITE.
- WHEN K07_SITE-AVTS.
- IF AVTS-PARTNR NE Z_AVTS_NR.
- MOVE AVTS-PARTNR TO SEARCH_AVTS-PARTNR.
- MOVE SEARCH_AVTS TO SEARCH.
- PERFORM U010-SEARCH-MATNR.
- ENDIF.
- WHEN K09_SITE-VT.
- IF AVTS-PARTNR NE Z_AVTS_NR.
- MOVE AVTS-PARTNR TO SEARCH_VT-PARTNR.
- MOVE SEARCH_VT TO SEARCH.
- PERFORM U010-SEARCH-MATNR.
- ENDIF.
- WHEN K0_SITE-PN.
- IF ( AVTS-PARTNR NE Z_AVTS_NR )
- OR ( NOT ( AVTS-ORGNR = Z_AVTS_ORGNR ) ).
- MOVE AVTS-PARTNR TO SEARCH_PN-PARTNR.
- MOVE AVTS-ORGNR TO SEARCH_PN-ORGNR.
- MOVE SEARCH_PN TO SEARCH.
- PERFORM U010-SEARCH-MATNR.
- ENDIF.
- ENDCASE.
- * Easy )
- * Easy ( DECISION TRANSACTION
- * Easy !
- IF ( SEARCH_FLAG EQ SPACE )
- AND ( AVTS-LOEVM EQ SPACE ).
- MOVE K01-NEWRECORD TO Z_TRANSCD.
- PERFORM U030-BTCI-CREATE.
- ELSE.
- IF AVTS-LOEVM NE SPACE.
- MOVE K02_CORRECTION TO Z_TRANSCL.
- PERFORM U050-BTCI-CREATE.
- ENDIF.
- MOVE MATCH_MATNR TO MATCH_TEST.
- IF MATCH_TEST-FELD_REST SPACE.
- IF E_RECORD-SITE = K07_SITE_AVTS.
- IF AVTS-ORGNR > SPACE.
- MOVE AVTS-ORGNR TO MATCH_ORGNR-ORGNR.
- WRITE: ' #' TO MATCH_ORGNR-ORGNR + SY-FDPOS.
- MOVE MATCH_ORGNR TO Z_MATNR-MATNUM.
- MOVE K01_NEWRECORD TO Z_TRANSCD.
- PERFORM U030-BTCI-CREATE.
- ELSE.
- WRITE: SEARCH.
- ENDIF.
- ELSE.
- WRITE: SEARCH.
- ENDIF.
- ENDIF.
- ENDIF.
- MOVE: AVTS-PARTNR TO Z_AVTS_NR,
- AVTS-ORGNR TO Z_AVTS_ORGNR.
- * Easy )
- * Easy )
- ENDDO.
- * Easy )
- * Easy ( SUBROUTINES
- * Easy !
- * Easy ( U010-SEARCH-MATNR
- * Easy !
- FORM U010-SEARCH-MATNR.
- CLEAR: SEARCH_FLAK, Z_FOUND.
- CASE Z_MACID.
- WHEN K03_MACID_AVTS.
- SELECT * FROM MACO WHERE MACDB EQ 'MARA'
- AND MACID EQ Z_MACID
- AND RESKY GE SEARCH.
- IF MACO-RESKY(29) NE SEARCH.
- MOVE 'N' TO Z_FOUND.
- EXIT.
- ENDIF.
- WRITE: MACO-RESKY+46(10) TO Z_MATNR-MATNUM.
- MOVE SPACE TO Z_MATNR-ORGNR.
- ENDSELECT.
- WHEN K04_MACID_PN.
- SELECT * FROM MACO WHERE MACDB EQ 'MARA'
- AND MACID EQ Z_MACID
- AND RESKY GE SEARCH.
- IF MACO-RESKY(33) NE SEARCH.
- MOVE 'N' TO Z_FOUND.
- EXIT.
- ENDIF.
- WRITE: MACO-RESKY+48(10) TO Z_MATNR-MATNUM.
- MOVE SPACE TO Z_MATNR-ORGNR.
- ENDSELECT.
- ENDCASE.
- IF ( SY-SUBRC NE 0 )
- OR ( Z_FOUND NE SPACE ).
- MOVE 'X' TO SEARCH_FLAG.
- CASE Z_MACID.
- WHEN K03_MACID_AVTS.
- MOVE AVTS-PARTNR TO MATCH_MATNR_AVTS-PARTNR.
- MOVE MATCH_MATNR_AVTS TO MATCH_MATNR
- WHEN K04_MACID_AVTS.
- MOVE AVTS-PARTNR TO MATCH_MATNR_PN-PARTNR.
- MOVE AVTS-ORGNR TO MATCH_MATNR_PN-ORGNR.
- MOVE MATCH_MATNR_PN TO MATCH_MATNR
- ENDCASE.
- MOVE MATCH_MATNR TO Z_MATNR-MATNUM
- ENDIF.
- ENDFORM.
- * Easy )
- * Easy ( U020-INIT-BTCI
- * Easy !
- FORM U020-INIT-BTCI.
- REFRESH DYNPRO D00001.
- MOVE: SY-MANDT TO D00001-MANDT,
- FOLDER TO D00001-BNAME,
- E_RECORD-SITE TO D00001-BNAME+4,
- SY-TIME TO D00001-BNAME+6,
- SY-LANGU TO D00001-SPRAS,
- 'PASS' TO D00001-BCODE.
- TRANSFER-DYNPRO D00001.
- ENDFORM.
- * Easy )
- * Easy ( U030-BTCI-CREATE
- * Easy !
- FORM U030-BTCI-CREATE.
- REFRESH DYNPRO SAPMV13K_0100.
- MOVE K_COND TO SAPMV13K_0100-RV13K-KONAR.
- MOVE: K_STRU TO SAPMV13K_0100-RV13K-DSTRU,
- 'S' TO SAPMV13K_0100-SP,
- Z_TRANSCD TO SAPMV13K_0100-TC.
- TRANSFER-DYNPRO SAPMV13K_0100.
- REFRESH DYNPRO SAPMV13K_0203.
- IF AVTS-DATAB > SPACE.
- MOVE AVTS-DATAB TO SAPMV13K_203-RV13K-DATAB.
- ENDIF.
- ENDFORM.
- * Easy )
- * Easy )
-
- * Easy )
-